

import { Action } from '@ngrx/store';

import { Marker } from '../../models';

export enum MarkersActionTypes {
    ADD_MARKER = '[Marker] Add Marker',
    REMOVE_MARKER = '[Marker] Remove Marker',
    CLEAR_MARKER = '[Marker] Clear Marker'
}

export class AddMarker implements Action {
    readonly type = MarkersActionTypes.ADD_MARKER;
    constructor(public payload: Marker) {}
}

export class RemoveMarker implements Action {
    readonly type = MarkersActionTypes.REMOVE_MARKER;
    constructor(public payload: Marker) {}
}

export class ClearMarker implements Action {
    readonly type = MarkersActionTypes.CLEAR_MARKER;
}

export type MarkersAction 
    = AddMarker
    | RemoveMarker
    | ClearMarker;